<!--
 * @Description: 
 * @Date: 2020-12-15 15:57:51
 * @LastEditors: lother
 * @LastEditTime: 2020-12-16 11:47:56
 * @FilePath: \AccountOpening-H5\src\components\nextStep.vue
-->
<template>
    <div>
        <van-button type="info" block class="next-step" @click="submit"  native-type="submit">下一步</van-button>
        {{submitShow}}
    </div>
</template>
<script>
export default {
    props:{
        list:{
            type:Object,
            default:()=>{}
        },
        nextUrl:{
            type:String,
            default:()=>''
        },
        nextShow:{
            type:Boolean,
            default:()=>false
        },
    },
    computed:{
        code(){
            return this.$parent.code
        },
        submitShow(){
            return this.nextShow
        }
    },
    data() {
        return {
        }
    },
    mounted(){
        // this.init()
    },
    methods:{
        submit(){
            if(this.submitShow){
                console.log(1)
            }
            // this.$parent.$refs.form.validate()
            // .then(res=>{
            //     console.log(res)
            // })
            // .catch(() => console.log('promise catch err')); 
            // console.log(this.$parent.submit())
            // this.$router.push(this.nextUrl)
        },
    },
    watch:{
        code:{
            handler(val,old){
                console.log(val,old)
            },
            deep:true
        }
    }
}
</script>
<style lang="less" scoped>
    .next-step{
        margin:0.6rem 0 0.9rem ;
    }
</style>